﻿using System.Collections.Generic;
using Yun.Interface;
using Yun.Response;
using Yun.Util;

namespace Yun.Marketing.Request
{
    /// <summary>
    /// 退款剩余的红包
    /// yun.game.redpackets.refund
    /// </summary>
    public class RefundRedEnvelopeRequest:ITopRequest<IntResultResponse>
    {
        /// <summary>
        /// 红包ID
        /// </summary>
        public int RedEnvelopeId { get; set; }

        public string GetApiName()
        {
            return "yun.game.redpackets.refund";
        }

        public IDictionary<string, string> GetParameters()
        {
            var parameters = new YunDictionary
            {
                {"redenvelopeid",RedEnvelopeId}
            };
            return parameters;
        }

        public void Validate()
        {
            RequestValidator.ValidateMinValue("redenvelopeid", RedEnvelopeId, 1);
        }
    }
}
